Fix for paths that have tilda ~ in their URIs.