Allow state file path to be overridden. Fixes #49