Add code snippet to parse script arguments in JS.

(cherry picked from commit 8a37ffdca547a9de55116442a49baceb373ca239)
Process entire directories.

(cherry picked from commit 32ce5a41c4fa62bcf3630d287dc0a7415bf6a41e)
Ignore vim session files.

(cherry picked from commit 3ceb23f259d76eb6811ea0c3ebd70819d5356b0c)
Javascript sample to iterate over files in a directory.
Process only files with .tif/.tiff suffix.