pylib: refacotr and unify the checkHostname function

Now there is only 1 function checkhostname whcih is used in
several places
pylib: add include attribute to file tag in node.xml

This commit add support for the include attribute to the
file tag. In this way it is possible to include file on
the frontend node without using the eval tag.
See the discussion on the ML:
http://marc.info/?l=npaci-rocks-discussion&m=135938905904484&w=2

Some example:

    <file name="/etc/newfile" include="/etc/oldfile"/>

Copy the content of /etc/oldfile inside /etc/newfile
cat /etc/oldfile > /etc/newfile
Where oldfile is from the frontend.

   <file name="/etc/newfile" include="/etc/oldfile" mode="append"/>

Append the content of /etc/oldfile inside /etc/newfile
Where oldfile is from the frontend and newfile is on the installing host
node.xml: add mode=pipe to file tag

This commit add the mode pipe to the file tag of the rocks
kickstart xml language. See the discussion on the ML:
http://marc.info/?l=npaci-rocks-discussion&m=135938905904484&w=2

Examples:
   <file name="/etc/newfile" src="/etc/oldfile" mode="pipe">
     mycmd
   </file>

It runs: cat /etc/oldfile | mycmd > /etc/newfile
In this case both /etc/oldfile and newfile are on the installing host
(not on the frontend)

   <file name="/etc/newfile" mode="pipe">
     mycmd
   </file>

It runs: cat /etc/newfile | mycmd > /tmp/tmpfile; mv /tmp/tmpfile /etc/newfile
In this case /etc/newfile is on the installing host (not on the frontend)
tests: test the new rocks kickstart language features