By using the nsIFilePicker you can get the absolute path to your destination according to the platform you are working on. The most basic problem in navigating between Windows and Linux is the direction of the slash which separates the directories in the path.
By using the nsIFilePicker you can avoid having to deal with what platform you are working on. However, if you want to start manipulating files or subdirectories, then you must attach the nsIFile interface to your path, and use the append() function to add to the path.
var appRootDir= Components.classes[“@mozilla.org/file/local;1”]