Everything looks ok at first glance, but can you please run one of the simpler tests to start. Perhaps there is a permission issue on the folders you are using that is causing the root problem.
Please try the two tests i ran and described above first. If you can get those to work then we know that there is something subtly wrong in how you’re using the API. My gut feeling on this though is a permission issue. By running the first test (directly on the command line) you’ll be able to tell if that problem exists immediately.