Change -f to -d

-f is only for regular files and does not work
for detecting directories.

Since openstack-installer is a directory,
it is changed to -d.