Don't use ternary if statements. Fixes #8784

In fc3597a ternary if statements were added to `module_utils/basic.py` which are invalid in python 2.4

This pull request addresses this with a more verbose alternative.  There are other options to do this in less code, but they are a bit magical, and magic is usually bad when it comes to code.

Such magic would look like:

```python
'X': (0, stat.S_IXUSR)[apply_X_permission]
```