Add file mode test

Also describe fileutils.Copy and delete some debug code.