Fix URL paths. Copied from Pushy