This is a quite helpful script. I did a slight modification to use a generic "locate" command. I'm using mlocate which is slocate compatible. I simply added another else-if statement for the "locate" command and everything is working fine.
Edit the block of conditions that starts at line 24 so that it looks like:
if executable("slocate") let s:slocate_app = "slocate" elseif executable("rlocate") let s:slocate_app = "rlocate" elseif executable("locate") let s:slocate_app = "locate" else finish endif