Rewrite 'scap' script in Python

The shell is a poor environment for structured programming. scap's entanglement
with the shell makes it very hostile to casual improvement. If scap were
written in Python, it would be simpler to factor and extend.

While the Salt spaceship has a highly impressive hyper-galactic warp drive and
a magnificient holodeck, we need to figure out where we're going before we zoom
out into space.

The plan:
- Convert remaining scap scripts to Python.
- Break up procedural code into well-factor functions.
- Stop to reassess.

Change-Id: I06e82e046a4740a9ed04b86e9174815c16c7860f