Extracted the io redirection functions and placed them in their own file.
The new file is redir.h
Updated the makefile to accomodate the change.