fix case where path to scan was '.'; thanks Thomas