First court appearance for man accused of beheading ex-girlfriend