use getcwd_clean instead of Cwd directly
Putting the tainty stuff together at the end