Now handling BSD stat too

BSD stat (default on Macs) has a different flag for timestamp: `-f %m` instead of `-c %Y`.
The command may fail when determining which one to use, so I moved the `set -e`.
Also fixed the update-stack script.
Merge pull request #11 from ulsa/patch-10

Now handling BSD stat as well