Temporary patch for KARAF-3249

https://issues.apache.org/jira/browse/KARAF-3249: dirname error if the distribution path contains spaces