Fix tiny memory leak. Only strlen(base_path) once. Make patterns that start with ./ behave just like those that start with /.