Fixing fragile test albeit in a poor way.

When scheduling a job, the state transition of queued items happens asynchronously from the UI thread.
So if we hit the UI immediately afterward, you might not see the item in the pending state. Queue.maintain()
might not have run that to determine that it's in the pending state (as opposed to in the waiting state.)

So adding some delay artificially to work around this problem.

Ideally we should use something like waitForCond() to repeatedly test this until we find one, so that
we don't have to always wait for 3 secs, and instead wait at most 3 secs.
got rid of this 2nd argument after some more thought.
Fixing test bug.

The relative path resolution logic now removes redundant '/', so we cannot produce this weird path expression