MAHOUT-1594

Detail: https://issues.apache.org/jira/browse/MAHOUT-1594

Factorization example doesn't work correctly with Hadoop version: 2.4.0.2.1.1.0-385. The reason is that the example uses local for working directories. I've changed all references to local dirs to HDFS ones, change Linux shell commands to hadoop equivalents.
The  MAHOUT_HOME variable will very likly be set either "true", or unset. a simple check for it being set will do rather than checking that it is set to an integer.