Yes, that's fine. When your dependent is away at school it is a "temporary absence" so you can still say he lived with you all year.
**Disclaimer: Every effort has been made to offer the most correct information possible. The poster disclaims any legal responsibility for the accuracy of the information that is contained in this post.**