Change get_tu to be able to read options from config file.

Also add unittest for it.