Added check for APPDATA being null for WIN 7/8 machines