makeframes: edited script to look more like others

Added: cleanup; trap; while getops; logs
Changed: variables & functions script reference to correct name;
outputdir to correct file