Fix file import method

Fixes #3

Also:
- clean up payload validation code
- Raise for methods that don't return errors
Merge pull request #4 from sburns/fixfimport

Fix file import method