Fix print statements to be python3 compatible. Refs #5331