moved pathToURL into utils, fixed path serving there, too