use file system encoding for cmdline args

thanks to to wlhunag for the initial patch!