Re #64 Added failing unit test for query and permissions
Fixes #64 Updated Flow#query to consider permissions
Increased performance of #is()