Bug fixes

No longer use elementree.iterfind (Mac fix)
When run as plugin, always return directory item (fix for plugin ended
prematurely error)
Cleanup logging