Support API running in a folder of webclient

https://groups.google.com/forum/?fromgroups=#!topic/buddycloud-dev/ShM7P5NsJjs