Added better support for sourcemaps.
Unfortunately this does not seem to work with uglify, so minified files do not work yet.