and use the return of "base64" and "uuencode" to select the workable one (checking "base64" first); suggested by John Bowler. Added a check for too many arguments, also a JB suggestion. Accept output filename as an optional final argument.