Fixed errors in gene order and bug in makeflow generation.

* Changed try-except to with block and removed fp being closed in finally block.
* Fixed writing to file in gene-order
* Fixed the non-genomic case
* Fixed creation of genomic_ordering data structure.
* Other minor fixes were done to fix crashes.