Make a copy of input string without ending null byte, so valgrind can detect over-runs