protected function buildFileData(array $files)
	{
		$data = array();

		foreach ($files as $key => $file)
		{
			if (!is_numeric($key))
			{
				// If the key isn't numeric, then we are dealing with a file whose content has been supplied

				$data[$key] = array('content' => $file);
			}
			elseif (!file_exists($file))
			{
				// Otherwise, we have been given a path and we have to load the content
				// Verify that the each file exists.

				throw new \InvalidArgumentException('The file ' . $file . ' does not exist.');
			}
			else
			{
				$data[basename($file)] = array('content' => file_get_contents($file));
			}
		}

		return $data;
	}