Check for existence of directory property in the bowerrc file before using it

fixes #6