Bug fix in calibration related code

Instead of reading devpath from sysfs entry, use matched pattern for entry name itself.
Add error handling to readattr()
Fix regular expression to match sysfs entry