Added security check if file is accessed directly

Hello Ellot Condon,

Thanks for the nice plugin. I've added security check if file is accessed directly. Please review and if it's useful then merge in your repo.

Thanks,
rajeshstarlite