Some more minor fixes to sweep_rate_and_trap_study

We use a JSON file in the /tmp folder to keep track of which
acquisition is running; we did a few minor changes on how that file is
written here.