Add proper path mappings

This doesn't handle JSMs with .. as part of the path though.
Add flag to generate sourcemaps