Added scan_db( char hostname[] )
Added lock_table(void) and unlock_table(void)
Added command read and process loop in main
Changed command functions to not printf, instead printing in main loop.
  (to allow command functions to be used with out generating output)