This also enables launching server.cmd from arbitrary directories to match the behaviour of server.sh.