fixing gaping security hole in every resource.
making sure everything works as expected with tests
Merge pull request #16 from libryder/secure_resources

Secure resources