make sure sourcemap paths are correct

- also switches tests over to chai
- huge thanks to @Panya for help here!
Merge branch 'sourcemaps'