Better handling for special bit modes

This PR replaces the partially broken fixes from PR #9947 and #9935

Please see #9947 and particularly https://github.com/saltstack/salt/pull/9947#issuecomment-33617987 for further information.

Edit: Linked to the wrong comment by accident, the one with the PR summary is further down.