Add support for environment variables and '~' in paths

- Add utility to expand environment variables
- Revise rc-file searching to use new mechanism
- Expand environment variables when opening files
- Adapt filesystem unit tests for new mechanism
Fix restoring original environment during unit testing
Fix restoring HOME, etc.
Add environment variable expansion to source, read and write
Fix path resolution to match vim behavior

- Resolve defined variables leaving others "as is"
- Merge ExpandEnvironmentVariables with ResolvePath
- Adjust filesystem unit test now that "~" always resolves
Merge pull request #1292 from ricksladkey/fixes-filenames

Add support for environment variables and '~' in paths