Fix keyerror when creating menu for read-only folders