Fix double future resolve in file system

Fixes http://teampulse.telerik.com/view#item/277062
Merge pull request #485 from Icenium/totev/fix-double-future-resolve

Fix double future resolve in file system
Fix setting of profile-dir

Set profile-dir option with commonOptions setProfileDir function. Add tests for setProfileDir function to make sure correct value is used.