PageAgent: list all application script files

Modified PageAgent.getResourceTree() to guess what is the application's root
directory based on path in process's argv[1] and list all .js files under
this root directory.

Note that global modules are not listed.

@Schoonology: please review.