Include js dependencies in the template and cover MainTemplate with unit tests

would be good to check if file exists and it's readable, otherwise throw an exception. Maybe there is a sense to replace '/' to DIRECTORY_SEPARATOR. Also can you add the alias const 'DS' for DIRECTORY_SEPARATOR ? I think it's easy to use