better handling of dotfiles for ~/.common_env

made it more like legacy-common so it also handles .profile as last resort, creating one if needed.