Finishing touches to tests. Should no longer hang (basename called on empty filename was the culprit\!)