Add environment variable expansion to source, read and write
Merge branch 'fixes-filenames'