CORE-5596 Added metadata db contraints and indexes.

Added a build.sh script too.
CORE-5596 Added with-cwd support to with-temp-dir.

Updated the clojure-commons.file-utils/with-temp-dir macro to nest its body in a me.raynes.fs/with-cwd call.
Updated facepalm to use me.raynes.fs/file calls where appropriate so that it doesn't always need to use the path set in its with-temp-dir call.
CORE-5596 Added constraints dir to facepalm init mode.