Check whether we're on master or stable branch and create marker in the correct place. This ensures that they are always properly set. Change-Id: I4fede4a1e9d8a15fa7f932feefdb5eab13685aca