Fix bug in last commit: it didn't properly cleanse output string of binary junk, leading to "error writing to database" if C program ran off rails and printing binary".