Added check to make sure this is not a module

Added in a check at the end to make sure that this was the main script
and not a module for another script