server: work around R16 deprecation warnings
client: fix applet startup on Windows

On Windows sys.argv[0] does not contain a path name which causes chdir to raise
an exception.