Use str_copy instead of strdup

Since strdup is not standardized in ANSI C, using str_copy is better.
Merge pull request #31 from Constellation/use-str-copy

Use str_copy instead of strdup