Moves the windows file ext check to getExecPath

Reverted other functions to original state.