Fixed javascript import compressor ignoring import commands with subdirectories in them
Changed error handler slightly (bear in mind domain handling is still not marked stable in node)