1) Added a function to check if a file is present
2) Added a function to get the file handle
3) Added code to push child directories into the Q based on recurse flag
4) Substitution done in the pom template file contents for the string
"${temp.version}"

If you need to check if a file exists, you can use the following
function:
        if checkIfFileExists(filename)

To get the file handle, you can use the following function:
        getFileHandle(filename, permissions)

Substitution in pom.template.xml is done based on regular expressions
using the re modules,
        p = re.compile(r"\$\{temp\.version\}")
        pom_template_subs_contents = p.sub(version, str)