Small edits + rewritten Lib.IsFolder()

Edits mostly for debugginf purposes + I've rewritten the Lib.IsFolder()
method to be more accurate.