Update part_3_functions.pl

This file acts as a script to generate excel generating scripts from other perl scripts.
Added some new functions, controlling script and reordered some functions. Also fixed some errors.
Needs to be documented more comprehensively.
To use it: 
perl part_3_functions.pl <scriptname_to_read> <name_of output_script>