Add Directory model based on angular resource. ref #68
Reimplement success and error callback with better error message