[JENKINS-23146] Handle changes to folder checked out to '.'

Users report that the snapshot build `#398` below worked for them to resolve the problem remaining after #85 in that it did not handle changes to the folder checked out as `.`.