Use normalize_unix_path() function with WritableDir and apply url encoding to HTTP_MESSAGE