Added compatibility for OSX (and BSD in general) to the script by selecting gdate of date if it exists.
Gdate needs to be installed for this to work (brew install coreutils)
Merge pull request #1 from Wautr/stable

Added compatibility for OSX (and BSD in general).