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>