use consistent order for env var output
remove useless test
fix handling of ~/ paths when $HOME unset
stop using splitpath
clean up header