Split bash functions into separate files.

Just a little reorg