Fixed build error introduced by datastream namespace changes.

https://www.pivotaltracker.com/story/show/81986990
The new metadata stream path is changed from "/obj/ds" to "/obj/ds/fcr:metadata". So now the datastream name is in position paths[paths.length - 2] instead of  the last position paths[paths.length - 1]. Let me know if you would like to change it to use substring() instead.