Use wordpress built in function

hides os dependancy from wpec