fixed bug in flush() that prevented flushing under common circumstances
implemented directory views ("magic directories")