Explicitly null-terminate a string