Added validation to dtx attacher

DTX attacher now tries to parse the DTX files after
locating. If the parsing fails, then file is assumed
to be invalid and it warns the user.

Also refactored out parsing of DTX from
dtx concentration calculator