Changed strcpy to manual for-loop, fixing error occuring with strcpy generating buffer overflow error.
Changed from strlen to using size() as pointed out by Kjetil.
Optimised id copying slightly
manual merge (one instance of strncpy had been removed in master)
Merge pull request #59 from sintefmath/fixedStrcpyOverflow

Changed strcpy to manual for-loop, fixing error occuring with strcpy gen...