Fix for false security exception

Security exceptions would be raised for file names with a "%20" in them. This is because it is also a url-encoding for the "space" character.

Signed-off-by: Aaron Rosenzweig <aaron@chatnbike.com>
Improve documentation explaining why decoding is being done when and where it is. Refactor individual logic blocks (fetching the ERAttachment, evaluating if a request is legitimate) into their own methods to make code more digestible and better encapsulated.
Making sure a SecurityException is always thrown when we aren't able to return an attachment.

Signed-off-by: Aaron Rosenzweig <aaron@chatnbike.com>
Merge pull request #569 from recurve/ERAttachment_false_security_error

Good Job