Fixing memory copy problem.

We can simply use std::string objects and get around the problem this way.
Merge pull request #1 from holtgrewe/master

Fixing memory copy problem affecting files with long names.