GREP_OPTIONS environment variable can cause last_sync/last_upgrade failure

Fixes #11