added recognition of `~/` as home for directory input options -converts this to process.env.HOME