removed a lot of the errors
moved file writing to a separate script
now writes the gate.h file
added input, output, fanout gate function templates
pins now keep track of their functions
write gate function array
UPDATED PLY (plus some minor changes)