Improve binary key recognition

For certain random binary keys realpath() throws warning:
realpath() expects parameter 1 to be a valid path, string given

With this PR if binary key was given, the file path is not checked at all.