Man, who attacked woman with a bat and sexually assaulted her, sentenced to prison