Functions like ns_mkdir, etc, will work fine, you just have to watch out for ns_ or standard tcl functions that want to write something to stdout or elsewhere.
Have you done the problem sets? They are a little outdated, but are still fairly good. Also, I highly recommend looking at the documentation for the acs-templating package.