Added a marked array which keeps track of all the nodes that were already removed from the priority queue.
Some corrections in graph.c like - checking for NULL.
Closing all the FILE streams opened in main.c.