Separate config and state file manipulation logic from `whatpulsed.py` to allow reusing it for other scripts, such as `upload_computerinfo.py`.