updated file-io: don't open directories (mac)