Encode and decode text arguments for use on command line on windows