Add copy file command.
Fix bug where moving file from buffer would fail