small fix due to text layers

before text layers, the foreground was the active layer heading into the
custom layout actions.  Added js/action to make sure this is true after
the text layer is created.