#1970 - Make add watermarks more secure and add unit tests.
This follows #1855 and #1951...
- Ensured that invalid or illegal files are not added even if they have valid extensions.
- Added unit tests (currently there aren't any...)
Merge pull request #108 from shadlaws/fix_1970

#1970 - Make add watermarks more secure and add unit tests.