updated to make trailing "/" optional

This solves the problem of application_name having or not having a trailing "/"