Individual and environmental contributors to psychological distress during imprisonment