Fix an issue where we get an empty dir in the filemap. Not sure why
that happens.