Replace str copy with strdup

closes #13