Reworking some of the grunt compilation code so that timestamps work correctly and references to files all work out across environments