Ended up writing a php script that updated c2runtime.js and data.js for me:
function changeFilePointers($directory) {
//in c2runtime, point to data.js
$path_to_file = $directory . 'c2runtime.js';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("\"data.js\"", "\"/" . $directory . "data.js\"", $file_contents);
//Also point loading-logo.png in the right direction
$file_contents = str_replace("\"loading-logo.png\"", "\"/" . $directory . "loading-logo.png\"", $file_contents);
//save the file
file_put_contents($path_to_file, $file_contents);
//in data.js, point images to the right place
$path_to_file = $directory . 'data.js';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("\"images/", "\"/" . $directory . "images/", $file_contents);
file_put_contents($path_to_file, $file_contents);
//delete sw.js, I don't need it for now
$swLocation = $directory . "sw.js";
if (file_exists($swLocation))
{
unlink($directory . "sw.js");
}
}
This allows me a lot of flexibility when working with a framework (I'm using Laravel 5.1). I can now upload zipped games and load them through a route and don't have to rely on a traditional file structure.