When lastUrl = "file:///folder/" and currentUrl = "file:///folder" then currentUrl.isParentOf(lastUrl)
returns true, which causes the code to hit an assert couple lines below the check and also to not
adhere to its own documentation.
This change fixes the behavior by first normalizing both URLs and then comparing them.