Fixed cleanString() and test

Signed-off-by: Darren Hill <dchill42@gmail.com>