The Maryhill club opened up a seven-point gap with Dougie Imrie's men thanks to a hard-fought win at Cappielow.