Make gif import/export return better error codes
Before this commit, gif import/export filter would return
NoAccessToRead if handler couldn't find the correct flag in the file.
This commit changes it to FileFormatIncorrect and checks if the file is
readable beforehand.