Abstract failure recording
Factor out test directories