Maine man accused of killing four appears at court