Added an extra check for file type. (closes bower/bower#991)

If the file name ends with '/', we treat it as a directory even if the
metadata says it isn't.