miscutil: fixes translate_to_ascii

* translate_to_ascii() checks the characters one by one in order to
  make sure unrecognized values are ignored ("" instead of
  printing "[?]").

* Adds unit test for this case.

Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Federico Poli <federico.poli@cern.ch>