Fix fetch functions to preserve working directory.
Do not use readlink, does not work on Mac.
Add function for fetching from mercurial repositories.
Build pycifrw from mercurial repository.