St. Patrick's Athletic remain firmly in the title picture after a dramatic win at home to Bohemians in a game that saw two penalties awarded in stoppage time.