use isFile() function instead of looking at blocks on stat. fixes #1.