Fix ng WorkPackagesController relative root path handling

Extract projectIdentifier correctly from window.location when the
Rails application is running with a relative root path configured
(this solution is currently sub-optimal, relying on a global variable)

User Story #7089

Signed-off-by: Alex Coles <alex@alexbcoles.com>