Tidied scripts/dev to separate database updates, add directory protection,
and clarify purpose of some scripts