Use create_file_as_directory method implemented in specinfra v2.0.0beta20

Also use check_file_is_directory method to check if the directory exists or not.