Fix Kiosk mode race condition

Apparently Kiosk mode is running too fast.  It causes problems accessing
files too quickly that land in the OnSite folder.  A 1 second delay is
placed in the inner loop once .JPGs are discovered and this fixes the
problem.
Also consolidated all config.txt writes into one write, rather than
multiple file opens/writes/closes.