Script will now 'cd' the shell to it's parent directory before executing the main logic and cd back when completed. Also added notification handling so the sensor thresholds need to be violated twice in order for a notification to be sent