Check for encryption at file start and end

To properly detect encryption we would probably have to parse the pdf,
but this should help with some files which have the /Encrypt towards the
end of the file.