In your script file you have 

```
import sys, os
import inspect

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
```

Change it to

```
import sys, os
import inspect

from qgis.core import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
```