In commit 3f9d0c0762, we added a new possible private file. If the file
exists but there's an error reading it (common for permission issues),
currently we just move on to the next file, and if it doesn't exist we
may give up with that error.
That can "hide" the access problems making them harder to debug.
To help with those kinds of errors, this patch updates the logic to
return an error if a private key exists but is inaccessible.
It also adds an unit test for this function to cover the different
scenarios, and updates the docs to match.