Change user-agent for restler calls.
Find the good path of the changed file. Fix #19.

Try to find the longest path containing the watched folder name. This
is the path of the template to upload to.