Use str_copy instead of strdup

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

Use str_copy instead of strdup