Fix up test for curl existence to be more bash-ish.
Add discriminators for seeing if we are using git tracked metadata vs. flat metadata.
Add seperate shell library for working with flat metadata.
Make build_lib.sh source the appropriate metadata helper library.
Clean up whitespace in dev.
Move code the assumes we are dealing with flat metadata into flat_metadata.sh
Merge pull request #1948 from VictorLowther/start-refactoring-metadata

+2 Start refactoring metadata