Updated getCores() to operate on the cluster

Corrected the use of the xml parsing module to create
the elementree from a string instead of from a text file.
Replaced the terminal command to return the correct xml
string. The getCores() function counts the number of available
cores for use in other applications, instead of hard coding
the number of cores.