fixes error catching for attach

added test for catching errors for attach
publishing distribution files
Merge pull request #4 from pflannery/dev

patch fixes error catching for attach