Fix to work when inside a non-url-friendly dir name