Reworked script for file flexibility

You now call process_variable, not process_directory