Coffee: Copy the correct number of bytes in filenames

This pull request addresses issue #707.