Writing own shell in C