Move rewriteSourcemapPaths to top level, outside exports