Add check for executable and redirect stdin/out

Added front end parsing for executables. Made sure that
stdin and out were saved before any modification to
them are made. They are restored after all command.cpp
functions are called and over.