Better check of return values from app_isdir and app_access
Better check of return values from app_isdir and app_access

[extended tests]

Reviewed-by: Andy Polyakov <015edf36635e030d5e009e08808a59984e629740@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6033)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl