Family escapes early morning fire thanks to working smoke detector