Refactored code to allow multiple PHP files to generate one JS file.

This seems to be a lot more sensible than actually including the files
via require_once.
Updated readme, and once more github ate my lost comment.