Check that _copy_data() parameters are actually file descriptors.

 * Closes #1920.
Merge branch 'feature/1920-check-fd' into development