fix urls to be relative to directory