Helper functions for writing command line scripts in CodeIgniter