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: I0fac51252c69a1aec7efe95b73ac83fd2785273d
Reviewed-on: https://g2g.palm.com/3974
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>