Good questions. Yes, the sample isn't exactly what you are trying to do -- I pointed you to it to get some working code and configuration that you can modify.
You can ignore the fileRoot part and the foldering that the sample is doing if you want to simply store based on filename. The GetServerFileName method can return either a path or a filename or both.
If you return a filename or path, it will be related to the location you specify in the UploadStreamProvider configuration in web.config. For example, if you have a location="~/Files" in your web.config, and your application root is "c:\sites\yourapp", you'll get a base path of "c:\sites\yourapp\files". If you return "test.txt" from GetServerFileName, the file will be stored to "c:\sites\yourapp\files\test.txt".
You can also return a filename including a path, which will also be combined. With the data above, if you return "folder\test.txt" from GetServerFileName, the file will be stored to "c:\sites\yourapp\files\folder\test.txt".
You can also return an app relative path or absolute rooted path, in which case the base path from the location attribute is ignored. For example, if you return "~/files/test.txt" or "c:\sites\yourapp\test.txt", the file will be stored directly there, and the location attribute is ignored.
GetValidFileName is a function on the FileUploadStreamProvider class that removes any invalid characters (based on Path.GetInvalidFileNameChars) from the filename, to ensure that files uploaded don't cause errors simply because of their filename. If you're not doing any filtering of the characters in the filename other than the aforementioned space, I'd recommend passing it through GetValidFileName before you return it to ensure that you don't have issues with files uploaded from Mac's.