Fix to use file.path instead of file.base

Fix that file.base returns the base from
where the file glob starts searching, but the path
should be where the file is instead.