Add emptiness check in copyPointCloud()

This fixes #932 and adds a unit test.
Merge pull request #933 from taketwo/fix-932

Add emptiness check in copyPointCloud()