fix emitting a file to a relative url