Save and Exit Function

Have implemented the save and exit function. It succesfully saves
the details in the stock linked list to the specified csv file.