Fix local push to file:// URL.
Add test for pushing to a local file:// URL.
Fix a compile warning.
Factor out code to convert local "url" into a path.

Previously this code was shared between `local_push` and `local_connect`.
Fix write_object.
Merge pull request #2057 from GrahamDennis/local-file-url-push-fix

Fix local push to file:// URL.
Merge pull request #2076 from xtao/fix-zstream

Fix write_object.