hbc/locations: arg is file only if absolute or .rb file
hbc/locations: arg is file only if absolute or .rb file

Handle the case when an argument passed to `brew cask` is both the name
of a Cask and a non-Cask file in the current working directory.

Fixes https://github.com/caskroom/homebrew-cask/issues/25611.

konqui/brew,mgrimes/brew,DomT4/brew,vitorgalvao/brew,EricFromCanada/brew,ilovezfs/brew,vitorgalvao/brew,zmwangx/brew,maxim-belkin/brew,maxim-belkin/brew,palxex/brew,gregory-nisbet/brew,zmwangx/brew,JCount/brew,ilovezfs/brew,reitermarkus/brew,aw1621107/brew,Linuxbrew/brew,amar-laksh/brew_sudo,DomT4/brew,reitermarkus/brew,alyssais/brew,sjackman/homebrew,muellermartin/dist,DomT4/brew,reelsense/brew,amar-laksh/brew_sudo,konqui/brew,rwhogg/brew,claui/brew,alyssais/brew,JCount/brew,reelsense/brew,rwhogg/brew,mgrimes/brew,rwhogg/brew,tonyg/homebrew,konqui/brew,nandub/brew,zmwangx/brew,pseudocody/brew,mahori/brew,Linuxbrew/brew,pseudocody/brew,claui/brew,nandub/brew,vitorgalvao/brew,Linuxbrew/brew,gregory-nisbet/brew,sjackman/homebrew,EricFromCanada/brew,maxim-belkin/brew,MikeMcQuaid/brew,Homebrew/brew,bfontaine/brew,JCount/brew,aw1621107/brew,hanxue/linuxbrew,Homebrew/brew,vitorgalvao/brew,muellermartin/dist,palxex/brew,claui/brew,jmsundar/brew,alyssais/brew,amar-laksh/brew_sudo,jmsundar/brew,aw1621107/brew,gregory-nisbet/brew,MikeMcQuaid/brew,palxex/brew,reitermarkus/brew,konqui/brew,sjackman/homebrew,claui/brew,reelsense/brew,DomT4/brew,bfontaine/brew,reitermarkus/brew,hanxue/linuxbrew,nandub/brew,mahori/brew,MikeMcQuaid/brew,Homebrew/brew,nandub/brew,Homebrew/brew,EricFromCanada/brew,mgrimes/brew,bfontaine/brew,pseudocody/brew,MikeMcQuaid/brew,muellermartin/dist,Linuxbrew/brew,mahori/brew,tonyg/homebrew,jmsundar/brew,mahori/brew,ilovezfs/brew,EricFromCanada/brew,tonyg/homebrew,sjackman/homebrew,JCount/brew,hanxue/linuxbrew