handle encoding of sys.argv gracefully