Use iteritems instead of items to reach dict items
Added extra args to allow opening methods (read, write, append)
Added gitignore
Added tests