A few turns of masking tape work fine, assuming you're screwing rather than nailing, that is. Just hold the rail end in place too while putting the first screw in. My earlier suggestion to fix brackets to posts first follows having done it many times with mortice adapators into concrete posts, where you don't have the luxury of choice.