Get-InstallLocation modify

Added a few TrimEnd() methods to trim the last \ from the output and
changed the order so that if the installfolderpath is found, it’s
returned quicker.