Some initial work on allowing the duplication of a file (#255).