fixed bug in replace_number w/ single digit and added unit tests for replace_number.  Thanks to Ben Bolker for the issue.  close #178