Fix coverity static analysis warnings

:Release Notes:
Fixed warnings discovered by coverity tool.

:Detailed Notes:
Fixed warnings discovered by coverity tool.

:Testing Performed:
Tested with test scripts provided in src/test directory.

:QA Notes:

:Issue Addressed:
[GF-52091] Fix coverity issues in nodejs dynaload and pmlog components

Open-webOS-DCO-1.0-Signed-off-by: Vinay Ramachandra <ramachandra.vinay@lge.com>

Change-Id: Ie563c22f7f3ab937891d7673dca378ab31818959
Reviewed-on: https://g2g.palm.com/3973
Reviewed-by: DCO Verification
Reviewed-by: Vinay Ramachandra <ramachandra.vinay@lge.com>
Tested-by: Vinay Ramachandra <ramachandra.vinay@lge.com>
Reviewed-by: Mark Bessey <mark.bessey@lge.com>