Fix the alarm behaviour

Due to the way that the chrome.alarms API works, creating an alarm in
the past breaks the scheduledTime parameter - it is set to 'now' rather
than the 'when' parameter.
Fix bug in date validation