v3.1.1  fix a bug that created the diag file even when diagnostic mode was off, stop forcing the working directory to be the app's directory except in dev mode, set the working dir when creating shortcuts