Changed some stuff to make it work on Mac, also fixed so echo works better and cd is pretty much working.
Put fork inside else so cd will stop showing could not find command