General file system utility functions (eg, dodir cpfiles, generalized move, etc). Extended from an original work of Miki Tebeka