Added some functions in support of #222.

Also modified the DeviceRowtoObject() method to also have a $filter parameter, with the default = true. However, this was just to get through working on the switch exceptions report.  Something more global needs to be added to resolve #224, as the non-interactive sessions end up with no rights at all.  We need to detect that type of session and assume global read/write.