shell.c redirector functionality working, but extremely buggy