Fix #2152: Cast opened paths to string

path.resolve() was throwing an exception if given path was not a string.
When iterating through all given paths, each entry is casted by JS to
most suitable type and paths in form of a number (i.e. '1234') were
cast to Number, hence the bug.
Fix #2152: Cast opened paths to string

path.resolve() was throwing an exception if given path was not a string.
When iterating through all given paths, each entry is casted by JS to
most suitable type and paths in form of a number (i.e. '1234') were
cast to Number, hence the bug.
Merge pull request #2170 from skardach/fix-filename-string

Cast opened paths to string