handle pidfile correctly by pre-creating and chowning it; export the proper pidfile variable to autossh; fix deadly misuse of