removed -ansi and -pedantic
Fixed algorithm, added Makefile
Fixed coding
Added error on opening a directory