Unit tests for clsAPICommon and clsAPIFileUtils

Prepared initial tests for clsAPICommon and clsAPIFileUtils.
Added minor bug fixes and argument checking.
Method documentation continued