First public commit of SDBatchSearch.py

First cleaned up version suitable for committing publically.
This has reached a stage of complexity where it really needs a Jira as
part of the workflow.