Robustified miniLock.util.getBasenameAndExtensions