testing dir exists before trying rmdir in do_install