Fixed missing null termination.

Fixed: strncpy does not null terminate by itself thus we should do it
ourselves.
Merge pull request #118 from livioso/master

Fixed missing null termination.