Show error message if test -d failed

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>