Add AppRoot to allow changing the root path of an application
Simplify code
Merge pull request #573 from tpjg/approot

Add AppRoot to allow changing the root path of an application