File and Directory Comparison for Node.js