localDevSetup: replace databaseInterface with Django models
identifyFileFormat: file_.sip won't raise
createSIPfromTransferObjects: fix subsequent runs

If this script runs more than once, the SIP objects directory will
already be populated with some files. Make sure the contents of
objects/ is a directory before trying to list its contents, otherwise
this will fail.
dicts: don't try to expand path if sipdir not defined
Event: agent is nullable
databaseFunctions: add docstrings
databaseFunctions: add tests